import request from '@/utils/request'

// 查询LPA条款列表
export function listFundInvestorLpa(query) {
  return request({
    url: '/lpa/fundInvestorLpa/list',
    method: 'get',
    params: query
  })
}

// 无权限, 仅做子表数据动态变动时使用
export function listFundInvestorLpaNotPer(query) {
  return request({
    url: '/lpa/fundInvestorLpa/listNotPer',
    method: 'get',
    params: query
  })
}

// 查询当前LPA条款列表款列表(不分页查所有)
export function findListLpaTreeTerms(query) {
  return request({
    url: '/lpa/fundInvestorLpa/listTree',
    method: 'get',
    params: query
  })
}

// 查询当前LPA条款款列表基金报表
export function findFundLpaTermsList(query) {
  return request({
    url: '/lpa/fundInvestorLpa/findFundLpaTermsList',
    method: 'get',
    params: query
  })
}

// 查询LPA条款详细
export function getFundInvestorLpa(id) {
  return request({
    url: '/lpa/fundInvestorLpa/' + id,
    method: 'get'
  })
}
// 查询LPA条款详细
export function getFundInvestorLpaDto(fundId, lpId) {
  return request({
    url: '/lpa/fundInvestorLpa/getFundInvestorLpaDto/' + fundId + '/' + lpId,
    method: 'get'
  })
}

// 保存LPA条款
export function saveFundInvestorLpa(data) {
  return request({
    url: '/lpa/fundInvestorLpa/save',
    method: 'post',
    data: data
  })
}
// 保存LPA条款
export function saveFormFundInvestorLpa(data) {
  return request({
    url: '/lpa/fundInvestorLpa/saveFormData',
    method: 'post',
    data: data
  })
}

// 删除LPA条款
export function delFundInvestorLpa(id) {
  return request({
    url: '/lpa/fundInvestorLpa/' + id,
    method: 'delete'
  })
}

// 导出LPA条款
export function exportFundInvestorLpa(query) {
  return request({
    url: '/lpa/fundInvestorLpa/export',
    method: 'get',
    params: query
  })
}
